USE [RD_InventoryMart]
GO

/****** Object:  Index [PK_Inventory_Star_FactsDetails]    Script Date: 06/25/2010 13:04:35 ******/
ALTER TABLE [dbo].[Inventory_Star_FactsDetails] ADD  CONSTRAINT [PK_Inventory_Star_FactsDetails] PRIMARY KEY CLUSTERED 
(
	[GLDateID] ASC,
	[ItemNumber] ASC,
	[BusinessUnitCode] ASC,
	[Location] ASC,
	[LotNumber] ASC,
	[TimeOfDay] ASC,
	[UserID] ASC,
	[CreationDateID] ASC,
	[UniqueKeyIDInternal] ASC,
	[SourceID] ASC,
	[TransactionType] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO


USE [RD_InventoryMart]
GO

/****** Object:  Index [IX_FactsDet_CompanyID]    Script Date: 06/25/2010 13:04:28 ******/
CREATE NONCLUSTERED INDEX [IX_FactsDet_CompanyID] ON [dbo].[Inventory_Star_FactsDetails] 
(
	[CompanyNumberID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_FactsDet_CreationDate]    Script Date: 06/25/2010 13:04:28 ******/
CREATE NONCLUSTERED INDEX [IX_FactsDet_CreationDate] ON [dbo].[Inventory_Star_FactsDetails] 
(
	[CreationDateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_FactsDet_GLDate]    Script Date: 06/25/2010 13:04:28 ******/
CREATE NONCLUSTERED INDEX [IX_FactsDet_GLDate] ON [dbo].[Inventory_Star_FactsDetails] 
(
	[GLDateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_FactsDet_TransDate]    Script Date: 06/25/2010 13:04:28 ******/
CREATE NONCLUSTERED INDEX [IX_FactsDet_TransDate] ON [dbo].[Inventory_Star_FactsDetails] 
(
	[TransactionDateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_FactsDetails_BusinessUnitID]    Script Date: 06/25/2010 13:04:28 ******/
CREATE NONCLUSTERED INDEX [IX_FactsDetails_BusinessUnitID] ON [dbo].[Inventory_Star_FactsDetails] 
(
	[BusinessUnitID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_FactsDetails_CostID]    Script Date: 06/25/2010 13:04:28 ******/
CREATE NONCLUSTERED INDEX [IX_FactsDetails_CostID] ON [dbo].[Inventory_Star_FactsDetails] 
(
	[CostID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_FactsDetails_ItemBranchID]    Script Date: 06/25/2010 13:04:28 ******/
CREATE NONCLUSTERED INDEX [IX_FactsDetails_ItemBranchID] ON [dbo].[Inventory_Star_FactsDetails] 
(
	[ItemBranchID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_FactsDetails_ItemNumberID]    Script Date: 06/25/2010 13:04:28 ******/
CREATE NONCLUSTERED INDEX [IX_FactsDetails_ItemNumberID] ON [dbo].[Inventory_Star_FactsDetails] 
(
	[ItemNumberID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_FactsDetails_LocationID]    Script Date: 06/25/2010 13:04:28 ******/
CREATE NONCLUSTERED INDEX [IX_FactsDetails_LocationID] ON [dbo].[Inventory_Star_FactsDetails] 
(
	[LocationID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_FactsDetails_LotID]    Script Date: 06/25/2010 13:04:28 ******/
CREATE NONCLUSTERED INDEX [IX_FactsDetails_LotID] ON [dbo].[Inventory_Star_FactsDetails] 
(
	[LotID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_FactsDetails_PriceID]    Script Date: 06/25/2010 13:04:28 ******/
CREATE NONCLUSTERED INDEX [IX_FactsDetails_PriceID] ON [dbo].[Inventory_Star_FactsDetails] 
(
	[PriceID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_FactsDetails_TypeID]    Script Date: 06/25/2010 13:04:28 ******/
CREATE NONCLUSTERED INDEX [IX_FactsDetails_TypeID] ON [dbo].[Inventory_Star_FactsDetails] 
(
	[TypeID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [missing_index_125]    Script Date: 06/25/2010 13:04:28 ******/
CREATE NONCLUSTERED INDEX [missing_index_125] ON [dbo].[Inventory_Star_FactsDetails] 
(
	[ItemNumber02] ASC,
	[BusinessUnitID] ASC
)
INCLUDE ( [ItemNumberID],
[UnitCost],
[ExtendedCostPrice],
[GLCategory]) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [missing_index_361]    Script Date: 06/25/2010 13:04:28 ******/
CREATE NONCLUSTERED INDEX [missing_index_361] ON [dbo].[Inventory_Star_FactsDetails] 
(
	[SourceID] ASC,
	[ItemNumber] ASC,
	[BusinessUnitCode] ASC,
	[Location] ASC,
	[LotNumber] ASC,
	[TimeOfDay] ASC,
	[UserID] ASC,
	[UniqueKeyIDInternal] ASC,
	[TransactionType] ASC,
	[GLDateID] ASC,
	[CreationDateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO


